-- GENERATED SPELL FOR [Drillmaster Zurok] --


function spell0_19312(pUnit, Event) --@Knock Away,n/a--
pUnit:FullCastSpellOnTarget(18813,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19312', 567, 1)
end

function spell1_19312(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15578,pUnit)
pUnit:RegisterEvent('Sorts_19312', 590, 1)
end

function spell2_19312(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(33500,pUnit)
pUnit:RegisterEvent('Sorts_19312', 2000, 1)
end

function Sorts_19312(pUnit, Event)
local choix_sorts_19312 = math.random(0, 2)
if choix_sorts_19312 == 0 then
pUnit:RegisterEvent('spell0_19312', 1, 1)
end
if choix_sorts_19312 == 1 then
pUnit:RegisterEvent('spell1_19312', 1, 1)
end
if choix_sorts_19312 == 2 then
pUnit:RegisterEvent('spell2_19312', 1, 1)
end
end

function mob19312_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19312', math.random(1500, 3000), 1)
end

function mob19312_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19312_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19312_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19312, 1, 'mob19312_Action')
RegisterUnitEvent(19312, 2, 'mob19312_Leave')
RegisterUnitEvent(19312, 3, 'mob19312_Kill')
RegisterUnitEvent(19312, 4, 'mob19312_Die')
